(function(){
	function detailList(){
	var hash = window.location.hash.slice(1);
	var id = hash.split(",")[0];
	var type = hash.split(",")[1];
	var word_w = "900px";
	var word_h = "1300px";
	var ppt_w = "1000px";
	var ppt_h = "600px";
	$.get('../../portal/resource/queryDocument.json?resourceId=' + id,function(datas){
		if(datas.success){
	           
	           var dom = _.template($('#documentTpl').html());
	        
	           dom = dom(datas);
	            
	           $(".document").html(dom);
	           if('ppt'!=type){
	        	   $(".ck-slide").css("width",word_w);
		           $(".ck-slide").find("img").css("width",word_w);
		           $('.ck-slide').ckSlide({
						dir: 'x'
					});
		           $(".ck-slide-dir").css("height",word_h);
		           $(".ck-slide-dir").css("width",word_w);
	           }else{
	        	   $(".ck-slide").css("width",ppt_w);
		           $(".ck-slide").find("img").css("width",ppt_w);
		           $('.ck-slide').ckSlide({
						dir: 'x'
					});
		           $(".ck-slide-dir").css("height",ppt_h);
		           $(".ck-slide-dir").css("width",ppt_w);
	           }
	          
		}
	})

	}    
detailList();
	
})()